<template>
	<div class='file'>
		<el-dialog class="file_dialog" title="处理订单" center :visible.sync="dialogVisible" :before-close="handleClose">
			<div class='user-leaveWord'>
				<template v-if="form.customer_opinions">
					<template v-if="form.customer_opinions.length">
						<el-timeline>
							<el-timeline-item
								v-for="(item, index) in form.customer_opinions"
								:key="index"
								:timestamp="item.created_at"
							>
								<el-card class="messagebox">
									<Tooltip content="点我回复" class="fr">
										<i class="el-icon-chat-dot-round leaveWord ml5" v-if='item.role_id != 4' @click="showTextarea(item, index)"></i>
									</Tooltip>
									<div class="item" v-if="item.role_id == 5">
										<span class="item_time">{{item.created_at}}</span>
										<span class="item_user">发明人</span>
										<div class="item_message messageBackground_l">
											<span>{{item.review_cn}}</span>
										</div>
									</div>
									<div v-else-if='item.role_id == 4' class="item">
											<span class="item_time">{{item.created_at}}</span>
											<span class="item_user">流程员</span>
											<div class="item_message messageBackground_l">
												<span>{{item.review_cn}}</span>
											</div>
											<!-- <div class="deduction_message messageBackground_l" v-if="item.deduction_reason != ''">
												<div>
													<span>扣款原因：</span>
													<span class="ml10 font_danger">{{item.deduction_reason}}</span>
												</div>
												<div>
													<span>扣款金额：</span>
													<span class="ml10 font_danger">{{item.money_cn}}</span>
												</div>
											</div> -->
										</div>
									<div v-for="(agent, index2) in item.agent_message" :key="index2">
										<div class="agent_item clearfloat" v-if="agent.role_id == '2'">
											<span class="item_user fr">代理人</span>
											<span class="item_time fr">{{agent.created_at}}</span>
											<div class="item_message messageBackground_r fr">
												<span>{{agent.review_cn}}</span>
											</div>
										</div>
										<div v-else-if='item.role_id == 4' class="item">
											<span class="item_time">{{agent.created_at}}</span>
											<span class="item_user">流程人员</span>
											<div class="item_message messageBackground_l">
												<span>{{agent.review_cn}}</span>
											</div>
											<div class="deduction_message messageBackground_l" v-if="item.deduction_reason != ''">
												<div>
													<span>扣款原因：</span>
													<span class="ml10 font_danger">{{item.deduction_reason}}</span>
												</div>
												<div>
													<span>扣款金额：</span>
													<span class="ml10 font_danger">{{item.money_cn}}</span>
												</div>
											</div>
										</div>
										<div v-else class="item">
											<span class="item_time">{{agent.created_at}}</span>
											<span class="item_user">发明人</span>
											<div class="item_message messageBackground_l">
												<span>{{agent.review_cn}}</span>
											</div>
										</div>
									</div>
									<div v-if="item.show_input" class="clearfloat mt20">
										<el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="replyMessage"></el-input>
										<el-button class="fr mt10" type="primary" @click="submit(item)">发送</el-button>
										<!-- <el-button class="fr mt10 mr10" @click="resets ">重置</el-button> -->
									</div>
								</el-card>
							</el-timeline-item>
						</el-timeline>
					</template>
				</template>
			</div>

			<!-- 定稿文件 -->
			<div v-if="form.status == '定稿文件发送中'">
				<p>发送定稿文件</p>
				<p style="color:red">* 文件为文档格式：订单编号-代理人姓名-案件名称-案件类型.docx</p>
				<el-upload class="upload-demo" ref="upload" :auto-upload="false" :on-change="handleChange2" :action="baseUrl + '/api/order/'+ this.form.id +'/send/file'"
				 :file-list="fileList" :http-request="uploadSectionFile3" :on-remove="handleRemove" multiple :limit="5">
					<!-- <div slot="tip" class="el-upload__tip">选择的文件</div> -->
					<el-button v-no-more-click:8000 slot="trigger" size="small" type="primary">选择文件</el-button>
					<el-button v-no-more-click:8000 style="margin-left: 10px;" size="small" type="success" @click="submitUploadDG">确认发送</el-button>
				</el-upload>
			</div>

				<div v-if="form.status == '发明人确认定稿中'" class="confirmFile">
					<span class="confirmFile-title">定稿文件：</span>
					<span>
						<a v-for="item in form.confimFiles" :key="item.id" :href="baseUrl + '/api/download?path=' + item.file +'/'+ item.path"
						 :download="item.path" :title="item.path" class="el-icon-tickets file_sh" @click.stop="stopLook"></a>
					</span>
				</div>

			<!-- 完成文件 -->
			<div v-if="form.status == '上报文件上传中'">
				<p>上传完成文件</p>
				<p style="color:red">* 文件格式：编号-姓名(发明人)-案件名称-专利类型.rar/zip 后缀名为.rar/.zip</p>
				<!-- <p style="color:red">* 拟申报名称必须和说明书中的申报名称一致。</p> -->
				<p style="color:red">* 专利类型必须为：发明专利，外观设计，实用新型。</p>
				<el-upload
					class="upload-demo"
					ref="uploadOk"
					:auto-upload="true"
					:on-change="handleChangeByok2"
					:action="baseUrl + 'api/order/'+ this.form.id +'/upload/confirm/file'"
					:file-list="fileListByok"
					:on-remove="handleRemove"
					:http-request="uploadSectionFile2"
					multiple
					:show-file-list='false'
					:limit="5">
					<!-- <div slot="tip" class="el-upload__tip">选择的文件</div> -->
					<el-button v-no-more-click:8000 slot="trigger" size="small" type="primary">选择文件</el-button>
					<el-button v-no-more-click:8000 style="margin-left: 10px;" size="small" type="success" @click="uploadSectionFileByok2">确认上传</el-button>
				</el-upload>
				<div class="file-list">
					<div v-if='fileListV.length'>
						<span class="sameDay font_success">是否需要与其他案件同日提交，如需要，请勾选</span>
						<el-checkbox @change='sameDayCheckChange' v-model="sameDay.isSameDay">{{sameDay.isSameDay ? '是' : '否'}}</el-checkbox>

						<el-popover
							v-if='sameDay.isSameDay'
							placement="right"
							width="300"
							trigger="click">
							<el-input v-model="orderNumberQuery" @input='queryChanged' placeholder="请输入编号查询"></el-input>
							<div v-for="(item, index) in orderNumbers" :key="index" class="numberList">
								<span class="number">{{item.value}}</span>
								<el-checkbox v-model="item.isSelect"></el-checkbox>
							</div>
							<el-button slot="reference" type="primary" icon="el-icon-plus" size="small" class='ml10'></el-button>
						</el-popover>

						<div  v-for="(item, index) in orderNumbers" :key="index" class="numbers">
							<div v-if="item.isSelect" class="number numberItem" @mouseenter='fileListShowClose(item)' @mouseleave='fileListHidClose(item)'>
								<span >{{item.value}}</span>
								<span class="fr" v-if='item.close'>
									<i class="el-icon-close" @click="closeOrderNumber(item,index)"></i>
								</span>
							</div>


						</div>
						<br />
						<span class="font_success" v-if="form.is_distribution != 3">权利要求数超过10项的为超项数，小于等于10，超项数为0。</span>
					</div>
					<template >

						<div class="file-list_item"  v-for="(item,index) in fileListV" :key="index" @mouseenter='fileListShowClose(item)' @mouseleave='fileListHidClose(item)'>
							<el-tooltip :content="item.name" placement="top">
								<span class="file-list_item_name">{{item.name}}</span>
							</el-tooltip>
							<div class="file-list_item_checkbox" v-if="form.is_distribution != 3">
								<el-checkbox v-model="item.isBeyond">{{item.isBeyond ? '是' : '否'}}</el-checkbox>
							</div>
							<div class="file-list_item_input" v-if="form.is_distribution != 3">
								<el-input v-if="item.isBeyond" v-model.number="item.claimValue" size="small"></el-input>
							</div>

							<div class='fr' v-if='item.close'>
								<i class="el-icon-close" @click="closeFileList(item,index)"></i>
							</div>
						</div>
					</template>

				</div>
			</div>

			<el-dialog title="请输入您的工作邮件密码" center :visible.sync="dialogVisiblePwd" :before-close="handleCloseEmail" append-to-body>
				<el-input type="password" class="pwd_inp" placeholder="请输入发送邮件密码" v-model="emailPwd"></el-input>
				<el-button v-no-more-click:8000 type="primary" @click="handleCloseEmail">取消</el-button>
				<el-button v-no-more-click:8000 type="success" @click="emailPwdFn">确认</el-button>
			</el-dialog>
		</el-dialog>

		<beyondItem :showSameDay='true' :showBeyond='form.is_distribution == 3 ? false : true' ref="beyondItem" @submitPost="completeFilePost"></beyondItem>
	</div>
</template>
<script>
	import editEmailPwd from "./editEmailPwd";
	import aes from "~/util/aes.js";
	import axios from "axios";
	import beyondItem from '~/components/beyondItem-dialog'
	export default {
		props:['order_id'],
		data() {
			return {
				dialogVisible: false,
				fileList: [],
				fileListByok: [],
				baseUrl: global.baseurl,
				form: {},
				dialogVisiblePwd: false,
				emailPwd: "",
				fileListV:[],
				replyMessage: '',
				sameDay: {
					isSameDay: false,
					same_day_number: ''
				},
				orderNumbers: [],
				queryOrderNumbers: [],
				orderNumberQuery: ''
			};
		},
		components: {
			editEmailPwd,
			beyondItem
		},
		methods: {
			queryChanged (value) {
				let data = this.queryOrderNumbers.filter( item => {
					return item.value.search(value) > -1
				})
				this.orderNumbers = data
			},
			closeFileList(item,index) {
				this.fileListV.splice(index, 1)
				this.$refs.uploadOk.uploadFiles.splice(index, 1)
			},
			// 删除同日提交订单编号
			closeOrderNumber(item, index) {
				this.orderNumbers[index].isSelect = false
			},
			fileListHidClose (item) {
				item.close = false
			},
			fileListShowClose (item) {
				item.close = true
			},
			sameDayCheckChange(value) {
				if (value) {
					this.$axios.get('api/order/agent/list').then(res => {
						if (res.data.code == 200){
							let data = res.data.data
							for(let i = 0; i < data.length; i++) {
								let item = {
									value: data[i],
									index: i,
									isSelect: false,
									close: false
								}
								this.orderNumbers.push(item)
								this.queryOrderNumbers = this.orderNumbers
							}
						}
					})
				} else {
					this.orderNumbers = []
					this.sameDay.same_day_number = ''
				}
			},
			//上传
			uploadSectionFile2(params) {
				//this.fileListV.push(params.file);
			},
			showDialog(val) {
				this.form = val;

				this.fillGrouping(this.form)
				this.dialogVisible = true;
				if (this.form.status == '上报文件上传中') {
					this.orderSameDay()
				}
			},
			// 判断当前订单有无同日提交案件
			orderSameDay() {
				let params = {
					order: this.form.id
				}
				this.$axios(`api/order/${this.form.id}/have/same`, {params: params}).then(res => {
					if (res.data.code == 200) {

					} else {
						this.$message.error(res.data.message)
					}
				})
			},
			handleClose() {
				this.fileList = [];
				this.fileListV = [];
				this.fileListByok = [];
				this.dialogVisible = false;
				this.orderNumbers = []
				this.sameDay = {
					isSameDay: false,
					same_day_number: ''
				}
				this.orderNumberQuery = ''
			},
			fillGrouping (data) {
				if (data.confirm_file == null || data.confirm_file == "") {} else {
					let confimFiles = data.confirm_file.split("&");
					data.confimFiles = [];
					for (const i in confimFiles) {
						let itemobj = {
							id: i + 1,
							path: confimFiles[i],
							file: ''
						};
						let itemArr = itemobj.path.split("/")
						itemobj.path = itemArr[itemArr.length - 1]
						itemobj.file = itemArr.slice(0, 2).join("/");
						data.confimFiles.push(itemobj);
					}
				}
				if (data.back_review) {
					let isPush = true
					for(let i = 0; i < data.customer_opinions.length; i++) {
						if (data.customer_opinions[i].id == data.back_review.id) {
							return false
						} else {
							continue
						}
					}

					if (isPush) {
						data.customer_opinions.push(data.back_review)
					}
				}
			},
			emailPwdFn() {
				if (this.emailPwd == "") {
					this.$message.error("发送邮件密码不能为空");
					return;
				}
				let obj = {
					pwd: this.emailPwd
				};
				this.$axios
					.post("api/consumer/set/emailpwd", obj)
					.then(({
						data
					}) => {
						if (data.status == "success") {
							//this.$message.success("设置成功");
							//将密码存入cookie
							let userObj = this.$store.state.user;
							userObj.email_pwd = this.emailPwd;

							//修改后先清空cookie
							this.$store.commit("delUser");
							this.$cookies.remove("user");

							this.$cookies.set("user", aes.Encrypt(JSON.stringify(userObj)));
							this.$store.commit("setUser", userObj);

							this.dialogVisiblePwd = false;
							this.submitUploadDG();
						} else {
							this.$message.error("设置失败" + data.message);
						}
					})
					.catch(err => {
						this.$message.error(err);
					});
			},
			handleCloseEmail() {
				this.dialogVisiblePwd = false;
			},
			//判断格式
			handleChange(file, fileList) {
				let that = this;
				//验证文件类型
				let fileName = file.name;
				//文件切成数组 然后去判断格式
				let fileNameArr = fileName.split("-");
				let arrLen = fileName.split("-").length;
				//获取后缀名 必须是文档格式
				let pos = fileName.lastIndexOf(".");
				let lastName = fileName.substring(pos, fileName.length);
				if (
					// lastName.toLowerCase() !== ".doc" &&
					lastName.toLowerCase() !== ".docx"
				) {
					that.$message.error("文件必须为.docx格式");
					fileList.pop();
				}
			},
			handleChange2(file, fileList){
				let tempList = [];//可以上传的文件
				for(let i = 0;i<fileList.length;i ++){
					let canUpload = true;//是否可以上传
					let that = this;
					//验证文件类型
					let fileName = fileList[i].name;
					//文件切成数组 然后去判断格式
					let fileNameArr =  fileName.substring(that.form.order_number.length + 1).split("-");
					let arrLen = fileName.split("-").length;
					let orderNum = fileName.substr(0, that.form.order_number.length);
					//获取后缀名 必须是文档格式
					let pos = fileName.lastIndexOf(".");
					let lastName = fileName.substring(pos, fileName.length);
					if (
						// lastName.toLowerCase() !== ".doc" &&
						lastName.toLowerCase() !== ".docx"
					) {
						that.$message.error("文件必须为.docx格式");
						canUpload = false;
					} else if (fileNameArr.length != 3) {
						that.$message.error('请按照格式：(订单编号-代理人-案件名称-专利类型.docx),修改文件名后重新上传')
						canUpload = false;
					} else if (orderNum != that.form.order_number) {
						that.$message.error("文件名中订单编号与订单不符合，请修改后重新上传");
						canUpload = false;
					} else if (fileNameArr[0] != that.form.agent.name) {
						that.$message.error("代理人姓名不一致");
						canUpload = false;
					} else if (!/^(发明专利|实用新型|外观设计)$/.test(fileNameArr[fileNameArr.length-1].split(".")[0])) {
						that.$message.error("案件类型必须是【发明专利, 实用新型, 外观设计】中的一种");
						canUpload = false;
					}
					if(canUpload){
						tempList.push(fileList[i]);
					}
				}
				this.fileListV.splice(0,this.fileListV.length,...tempList);
				fileList.splice(0,fileList.length,...tempList);
				return ;
			},
			//发送定稿提交
			submitUploadDG() {
				let list = document.getElementsByClassName(
					"el-upload-list__item is-ready"
				);
				if (list.length == 0) {
					this.$message({
						type: "warning",
						message: "请选择需要发送的文件！"
					});
					return;
				}
				// FormData 对象
				var form = new FormData();
				// 文件对象
				for (let i in this.fileListV) {
					form.append(i==0?"file":("file"+(i*1+1)), this.fileListV[i].raw);
				}
				form.append("order", this.form.id);
				axios({
					method: "post",
					url: this.baseUrl + "/api/order/" + this.form.id + "/send/file",
					data: form,
					headers: {
						"Content-Type": "multipart/form-data",
						Authorization: "Bearer " + this.$store.state.token
					}
				})
				.then(res=>{
					if(res.data.code == 200){
						this.dialogVisible = false;
						this.fileList = [];
						this.fileListV = [];
						this.$message({
							type: "success",
							message: "发送成功",
							duration: 2000
						});
						// this.$router.go(0)
						this.$emit("chageData");
						this.dialogVisible = false
					} else{
						this.dialogVisiblePwd = true;
					}
				})
			},
			uploadSectionFile3(){

			},
			//发送定稿
			uploadSectionFile(param) {},
			handleRemove(file, fileList) {
				this.fileListV = fileList;
			},

			//完成文件
			handleChangeByok(file, fileList) {
				let that = this;
				//验证文件类型
				let fileName = file.name;
				//文件切成数组 然后去判断格式
				let fileNameArr = fileName.split("-");
				let arrLen = fileName.split("-").length;
				//获取后缀名 必须是压缩文件(zip/rar)
				let pos = fileName.lastIndexOf(".");
				let lastName = fileName.substring(pos, fileName.length);
				if (
					lastName.toLowerCase() !== ".zip" &&
					lastName.toLowerCase() !== ".rar"
				) {
					that.$message.error("文件必须为压缩包格式");
					fileList.pop();
				}
				//后缀通过
				else {
					if (fileNameArr.length != 7) {
						that.$message.error(
							"请按照格式：(编号-姓名(发明人)-案件名称-专利类型.rar/zip),修改文件名后重新上传"
						);
						fileList.pop();
					}
				}
			},
			//完成文件
			handleChangeByok2(file, fileList) {

				let tempList = [];//可以上传的文件
				for(let i = 0;i<fileList.length;i ++){
					let canUpload = true;//是否可以上传
					let that = this;
					//验证文件类型
					let fileName = fileList[i].name;
					//文件切成数组 然后去判断格式
					let fileNameArr = fileName.substring(this.form.order_number.length + 1).split("-");
					let arrLen = fileName.split("-").length;
					let orderNum = fileName.substr(0, this.form.order_number.length); // 上传文件订单编号
					//获取后缀名 必须是压缩文件(zip/rar)
					if(orderNum != this.order_id){
						that.$message.error("文件名的订单编号不正确");
						canUpload = false;
					}else if(fileNameArr[0] == this.form.agent.name){
						that.$message.error("发明人姓名不正确");
						canUpload = false;
					}else if(fileName.split(".")[1] !== "zip" && fileName.split(".")[1] !== "rar"){
						that.$message.error("文件必须为压缩包格式");
						canUpload = false;
					}else if(!/^(发明专利|实用新型|外观设计)$/.test(fileNameArr[fileNameArr.length-1].split(".")[0])){
						that.$message.error("专利类型必须是【发明专利, 实用新型, 外观设计】中的一种");
						canUpload = false;
					}else if (fileNameArr.length != 3) {
						that.$message.error(
							"请按照格式：(编号-姓名(发明人)-案件名称-专利类型.rar/zip),修改文件名后重新上传"
						)
						canUpload = false;
					}
					if(canUpload){
						tempList.push(fileList[i]);
					}
				}
				this.fileListV.splice(0,this.fileListV.length,...tempList)
				for(let i = 0; i < this.fileListV.length; i++) {
					// let item = {
					//   isBeyond: false,
					//   claimValue: 0
					// }
					// this.fileListV[i].isBeyond = true
					// this.fileListV[i].claimValue = 0
					this.$set(this.fileListV[i],'isBeyond', false)
					this.$set(this.fileListV[i],'claimValue', 0)
					this.$set(this.fileListV[i],'close', false)
				}
				fileList.splice(0,fileList.length,...tempList);
				return ;
			},
			submitUploadByok() {
				let list = document.getElementsByClassName(
					"el-upload-list__item is-ready"
				);
				if (list.length == 0) {
					this.$message({
						type: "warning",
						message: "请选择需要上传的文件！"
					});
					return;
				}
				this.$refs.uploadOk.submit();
			},
			uploadSectionFileByok2() {
				// let list = document.getElementsByClassName(
				// 	"el-upload-list__item is-ready"
				// );
				if (this.fileListV == 0) {
					this.$message({
						type: "warning",
						message: "请选择需要上传的文件！"
					});
					return
				}
				// if (this.fileListV.length == 1 && this.form.is_distribution == 3) {

				// } else {
				// 	this.$refs['beyondItem'].show(this.fileListV)
				// }
				this.completeFilePost()

			},
			completeFilePost(args) {
				// FormData 对象
				var form = new FormData();
				// 文件对象
				for (let i in this.fileListV) {
					form.append(i==0?"file":("file"+(i*1+1)), this.fileListV[i].raw);
				}
				form.append("order", this.form.id);
				if (this.sameDay.isSameDay) {
					let sameDayNumbers = []
					for(let i = 0; i < this.orderNumbers.length; i++) {
						if (this.orderNumbers[i].isSelect) {
							sameDayNumbers.push(this.orderNumbers[i].value)
						}
					}
					let same_day_number = sameDayNumbers.join(",")
					form.append('same_day_number', same_day_number)
				}
				let claimArr = []
				let claim_item = ''
				for(let i = 0; i < this.fileListV.length; i++) {
					claimArr.push(this.fileListV[i].claimValue)
				}
				claim_item = claimArr.join(",")
				form.append('claim_item', claim_item)

				let url = null
				if (this.form.is_distribution == 3) {
					url =  `/api/order/${this.form.id}/agent/order/confirm/file`
				} else {
					url = `/api/order/${this.form.id}/upload/confirm/file`
				}
				axios({
					method: "post",
					url: this.baseUrl + url,
					data: form,
					headers: {
						"Content-Type": "multipart/form-data",
						Authorization: "Bearer " + this.$store.state.token
					}
				}).then(res => {
					if (res.data.status == "success") {
						this.$message({
							type: "success",
							message: "上传成功"
						});
						// this.$router.go(0)
						this.$emit('chageData')
						// this.dialogVisible = false;
						this.handleClose()
					} else {
						this.$message({
							type: "error",
							message: res.data.message
						});
					}
				});
			},
			// async  changeData () {
			// 	await this.$parent.getData // console: "this is one"
			// },
			//完成
			uploadSectionFileByok(param) {
				var fileObj = param.file;
				// FormData 对象
				var form = new FormData();
				// 文件对象
				form.append("file", fileObj);
				form.append("order", this.form.id);
				axios({
					method: "post",
					url: this.baseUrl + "/api/order/" + this.form.id + "/upload/confirm/file",
					data: form,
					headers: {
						"Content-Type": "multipart/form-data",
						Authorization: "Bearer " + this.$store.state.token
					}
				}).then(res => {
					if (res.data.status == "success") {
						this.$message({
							type: "success",
							message: "上传成功"
						});
						this.$emit("chageData");
							this.$router.go(0)
						this.dialogVisible = false;
						this.fileListByok = [];
					} else {
						this.$message({
							type: "error",
							message: res.data.message
						});
						this.fileListByok = [];
					}
				});
			},
			submit(item) {
				if (this.replyMessage == "") {
					this.$message({
						message: "请输入消息",
						type: "warning"
					});
				} else {
					this.submitPost(item)
				}
			},
			showTextarea(item, index) {
				for(let i = 0; i < this.form.customer_opinions.length; i++) {
					this.form.customer_opinions[i].show_input = false;
					if (i == index) {
						this.form.customer_opinions[i].show_input = true
					}
				}
			},
			submitPost(data) {
				let params = {
					opinion_id: data.id,
					review: this.replyMessage,
					type: 'agent'
				}
				this.$axios
					.post(`/api/order/${data.order_id}/agent_message`, params)
					.then(res => {
						if (res.data.code == 200) {
							this.$message({
								type: "success",
								message: "回复成功！"
							});
							this.replyMessage = ''
							this.$emit("chageData")
							setTimeout(() => {
								this.dialogVisible = false
							}, 300)
						} else {
							this.$message({
								type: "error",
								message: res.data.message
							});
						}
					})
					.catch(e => {
						console.log(e);
					});
			},
		}
	};
</script>
<style lang='less' scoped >
	.el-dialog {
		width: 900px;
		max-height: 700px;
		overflow-y: auto;
		margin-top: 5vh !important;
	}
	.file_dialog {
		.messagebox {
			width: 100%;
			background: #eef1f3;
		}

		.messageBackground_l {
			background: #fff;
		}
		.messageBackground_r {
			background: #c9e7ff;
		}
		.item {
			width: 100%;
			margin-bottom: 10px;
			.item_user {
				display: inline-block;
				width: 60px;
				font-size: 16px;
				font-weight: bold;
			}
			.item_message {
				max-width: calc(100% - 170px);
				display: inline-block;
				padding: 10px 15px;
				box-sizing: border-box;
				margin-left: 15px;
				border-radius: 5px;
				vertical-align: top;
				// margin-right: 90px;
			}
			.item_time {
				font-size: 12px;
				display: block;
				padding-left: 80px;
				margin-bottom: 5px;
				color: #ccc;
			}
			.deduction_message {
				margin: 20px 0 0 80px;
				max-width: calc(100% - 170px);
				padding: 10px 15px;
				border-radius: 5px;
			}
		}
		.agent_item {
			width: 100%;
			margin-bottom: 10px;
			position: relative;
			box-sizing: border-box;
			padding-top: 20px;
			.item_user {
				display: inline-block;
				width: 60px;
				font-size: 16px;
				font-weight: bold;
			}
			.item_time {
				position: absolute;
				right: 95px;
				top: 0px;
				font-size: 12px;
				display: block;
				// padding-right: 80px;
				margin-bottom: 5px;
				color: #ccc;
			}
			.item_message {
				max-width: calc(100% - 170px);
				display: inline-block;
				padding: 10px 15px;
				box-sizing: border-box;
				margin-right: 30px;
				border-radius: 5px;
				vertical-align: top;
				// margin-left: 80px;
			}
		}
	}
	.pwd_inp {
		margin-bottom: 15px;
	}
	.file_sh {
		font-size: 25px;
		margin-right: 10px;
	}
	.confirmFile {
		span {
			vertical-align: middle;
		}
		.confirmFile-title {
			margin-right: 10px;
		}
	}
	.file-list {
    .sameDay {
      width: 400px;
      display: inline-block;
      line-height: 1;
    }
    .file-list_item {
			line-height: 40px;
      .file-list_item_name {
        // max-width: 400px;
        // min-width: 250px;
        width: 400px;
        display: inline-block;
        line-height: 1;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
      }
      .file-list_item_checkbox {
        display: inline-block;
      }
      .file-list_item_input {
        display: inline-block;
        width: 100px;
        margin-left: 20px;
      }
    }
  }
	// .el-popover{
	// 	max-height: 500px;
	// 	overflow-y: auto;

	// }
	.numberList {
		line-height: 40px;
		.number {
			width: 200px;
			display: inline-block;
		}

	}
	.numbers {
		line-height: 30px;
		.numberItem {
			// border: 1px solid #ccc;
			width: 487px;
			display: inline-block;
		}
	}
	.noNumber {
		padding: 10px 0 0 10px;
	}
</style>
